<?php
/**
 * PrynLib
 * @copyright 2007-2009 Prynel
 * @author Olivier ROGER <roger.olivier@gmail.com>
 * @category libPrynel
 * @package Form
 * @version $Revision: 80 $
 */

/**
 * Element Hidden
 * @category libPrynel
 * @package Form
 * @subpackage Form_Element
 * @version 1.0.0 
 * @author Olivier ROGER <roger.olivier@gmail.com>
 * @copyright  2007-2008 Prynel
 *       
 *
 */
class Form_Element_Hidden extends Form_Input
{
	/**
	 * Constructeur
	 *
	 * @param string $nom
	 * @param Form_Form $form
	 * @access public
	 */
	public function __construct($nom,$form)
	{
		parent::__construct($nom,$form);
		if(!isset($this->attrs['type']))
			$this->attrs['type'] = 'hidden';
	}
	
	/**
	 * Ecriture de l'objet
	 *
	 * @access public
	 * @return string
	 */
	public function __toString()
	{
		$attributs = $this->attrsToString();
		return "\t".'<input '.$attributs.' value="'.htmlspecialchars($this->value).'" />'."\n";
	}
}
 ?>